<template>
  <div class="discuss" style="padding: 1.25rem;">
    <div class="up">
        <router-link to="/chatone"><van-icon name="arrow-left" /></router-link>
        <span>每日新发现</span>
    </div>
    <div class="hot">社区热门内容</div>

        <main v-for="(v,i) in this.$store.state.xingyu.Xyy" :key="i" style="       border-bottom: 2px solid #f6f6f6;" @click="fun(v)">
            <div class="top">
                <div class="img">
                    <img :src="v.img" alt="">
                </div>
                <div class="right">
                    <div class="name">
                        <p>{{v.name}}</p>
                        <b>{{v.job}}</b>
                    </div>
                    <section>...</section>
                </div>
            </div>
            <div class="main">
                <p>{{v.Pythonone}}</p>
                <p>{{v.Pythontwo}}</p>
                <b>{{v.article}}</b>
            </div>
            <div class="down" style="display: flex;justify-content: space-between;">
            <div><van-icon name="good-job-o" /><span>15</span></div>
            <div><van-icon name="comment-o" /><span>2</span></div>
            <div class="last"><van-icon name="like" /><span></span></div>
    </div>
        </main>
   
    </div> 


</template>

<script>
export default {
    mounted(){
      this.$store.dispatch("DISCUSS_DATA")
      console.log(this.$store.state.xingyu.Xyy);
    }, 
    methods:{
        fun(v){
              this.$router.push({
                name:'dischildren',
                params:{ dischildren: v}
              })
            },
    }
    
}
</script>

<style lang="scss" scoped>
    b,
strong {
 font-weight: 400;
}
* {
 padding: 0;
 margin: 0;
 box-sizing: border-box;
 font-size: 0.16rem;
 align-items: center;
}
.discuss{
    .up{
        padding: .625rem 0;
        border-bottom: 1px solid #f6f6f6;
        span{
            margin-left: 7.5rem;
        }
    }
    .mian{
        font-size: 1rem;
        line-height: 2rem;
    }
   .top{
    display: flex;
    padding: .9375rem 0;
    .img{
        margin-right: .625rem;
        img{
            width: 1.5625rem;
        height: 1.5625rem;
        }
    }
    .right{
        width: 19.375rem;
        display: flex;
        justify-content: space-between;
        p{
            font-weight: 700;
        }
    }
    section{
        font-size: 1rem;
        font-weight: 700;
    }
   
   }
    .hot{
        margin: .9375rem;
        font-weight: 700;
        font-size: 1rem;
    }

}
</style>